home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / PAL.PAK / PALPPG.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  85 lines

  1. // palppg.cpp : Implementation of the CPalPropPage property page class.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. #include "stdafx.h"
  15. #include "pal.h"
  16. #include "palppg.h"
  17.  
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23.  
  24. IMPLEMENT_DYNCREATE(CPalPropPage, COlePropertyPage)
  25.  
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // Message map
  29.  
  30. BEGIN_MESSAGE_MAP(CPalPropPage, COlePropertyPage)
  31.     //{{AFX_MSG_MAP(CPalPropPage)
  32.     //}}AFX_MSG_MAP
  33. END_MESSAGE_MAP()
  34.  
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // Initialize class factory and guid
  38.  
  39. IMPLEMENT_OLECREATE_EX(CPalPropPage, "PAL.PalPropPage.1",
  40.     0x37446b85, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
  41.  
  42.  
  43. /////////////////////////////////////////////////////////////////////////////
  44. // CPalPropPage::CPalPropPageFactory::UpdateRegistry -
  45. // Adds or removes system registry entries for CPalPropPage
  46.  
  47. BOOL CPalPropPage::CPalPropPageFactory::UpdateRegistry(BOOL bRegister)
  48. {
  49.     if (bRegister)
  50.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  51.             m_clsid, IDS_PAL_PPG);
  52.     else
  53.         return AfxOleUnregisterClass(m_clsid, NULL);
  54. }
  55.  
  56.  
  57. /////////////////////////////////////////////////////////////////////////////
  58. // CPalPropPage::CPalPropPage - Constructor
  59.  
  60. CPalPropPage::CPalPropPage() :
  61.     COlePropertyPage(IDD, IDS_PAL_PPG_CAPTION)
  62. {
  63.     //{{AFX_DATA_INIT(CPalPropPage)
  64.     m_Length = 0;
  65.     //}}AFX_DATA_INIT
  66. }
  67.  
  68.  
  69. /////////////////////////////////////////////////////////////////////////////
  70. // CPalPropPage::DoDataExchange - Moves data between page and properties
  71.  
  72. void CPalPropPage::DoDataExchange(CDataExchange* pDX)
  73. {
  74.     //{{AFX_DATA_MAP(CPalPropPage)
  75.     DDP_Text(pDX, IDC_LENGTHEDIT, m_Length, _T("Length"));
  76.     DDX_Text(pDX, IDC_LENGTHEDIT, m_Length);
  77.     DDV_MinMaxInt(pDX, m_Length, 1, 255);
  78.     //}}AFX_DATA_MAP
  79.     DDP_PostProcessing(pDX);
  80. }
  81.  
  82.  
  83. /////////////////////////////////////////////////////////////////////////////
  84. // CPalPropPage message handlers
  85.